//
//  WmcTeamQRCodeView.swift
//  YPWatermarkCamera
//
//  Created by yupao_ios_macmini06 on 2022/9/14.
//

import UIKit

class WmcTeamQRCodeView: WmcBaseView {
    override func makeUI() {
        addSubview(teamIdLabel)
        addSubview(noteLabel)
        addSubview(qrCodeImgView)
        qrCodeImgView.addSubview(appIconImgView)

        backgroundColor = UIColor.wmc_white_FFFFFF
        layer.cornerRadius = 8
        clipsToBounds = true

        teamIdLabel.snp.makeConstraints { make in
            make.top.equalTo(24)
            make.centerX.equalToSuperview()
            make.height.greaterThanOrEqualTo(26)
        }
        noteLabel.snp.makeConstraints { make in
            make.top.equalTo(teamIdLabel.snp.bottom).offset(4)
            make.height.greaterThanOrEqualTo(22)
            make.centerX.equalToSuperview()
        }
        qrCodeImgView.snp.makeConstraints { make in
            make.top.equalTo(noteLabel.snp.bottom).offset(20)
            make.centerX.equalToSuperview()
            make.width.height.equalTo(196)
            make.bottom.equalTo(-24)
        }

        appIconImgView.snp.makeConstraints { make in
            make.center.equalToSuperview()
            make.width.height.equalTo(45)
        }
    }

    lazy var teamIdLabel: UILabel = {
        let view = UILabel()
        view.textColor = UIColor.wmc_grayH2_323233
        view.font = 18.yp.uiFont(weight: .semibold)
        view.text = "团队号:123456"
        return view
    }()

    lazy var noteLabel: UILabel = {
        let view = UILabel()
        view.textColor = UIColor.wmc_grayH8_8A8A99
        view.font = 13.yp.uiFont
        view.text = "微信号扫一扫加入团队"
        return view
    }()

    lazy var qrCodeImgView: UIImageView = {
        let view = UIImageView()
        // view.image = UIImage.init(named: "qrCode_invite_icon")
        return view
    }()

    lazy var appIconImgView: UIImageView = {
        let view = UIImageView()
        view.layer.cornerRadius = 4
        view.clipsToBounds = true
        return view
    }()
}
